<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="ipdesk.common.Codes" %>

<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
<script type="text/javascript">
$(document).ready(function(){
	$("select[name='deskCode']").change(function(){
		var deskCode = $(this).find("option:selected").val();
		//alert(deskCode);
		location.href = "/invade/invadeList.desk?deskCode=" + deskCode;
	});
	
	$("#order").change(function(){
		$("#invadeList").attr('action','/invade/invadeList.desk').submit();
	});
	
	$("#state").change(function(){
		$("#invadeList").attr('action','/invade/invadeList.desk').submit();
	});
});
</script>
<link rel="stylesheet" type="text/css" href="/css/invasion.css"/>
<script type="text/javascript" src="/js/invade.js"></script>

<s:url id="listURLPrev" value="/invade/invadeList.desk">
	<s:param name="pageNumber">
		<s:property value="pageInfoDataMap.pageNumber - 1"/>
	</s:param>
	<s:param name="deskCode">
		<s:property value="deskCode"/>
	</s:param>
</s:url>

<s:url id="listURLNext" value="/invade/invadeList.desk">
	<s:param name="pageNumber">
		<s:property value="pageInfoDataMap.pageNumber + 1"/>
	</s:param>
	<s:param name="deskCode">
		<s:property value="deskCode"/>
	</s:param>
</s:url>
<s:set name="currentPageNumber" value="pageNumber"/>

<s:set name="totalCount" value="%{totalCount}"/>
<s:set name="authCode" value="%{authCode}"/>
<s:set name="orgCode" value="#session.orgCode"/>

<form name="invadeList" id="invadeList" method="post">
<input type="hidden" name="deskCodeForExcel" value="<s:property value="#session.deskCode"/>"/>
<input type="hidden" name="userSeq" value="<s:property value="#session.userSeq"/>"/>
<input type="hidden" name="authCode" value="<s:property value="#session.authCode"/>"/>
<input type="hidden" name="reportGubun" value="invade"/>

 <!-- 오른쪽 내용 시작 -->
      <dl class="Right_Contents_area">
        <dd class="Center_Top_title"> <span class="top_title"><img src="/images/report/invasion/SubContents_Tit_01.gif" width="370" height="42" alt="침해조사 일지" /></span> <span class="top_navi">HOME > 업무보고 > 침해조사 상담일지</span></dd>
        <dd class="Right_Contents_Search"><img src="/images/report/apply/SubContents_Tit_CenterChoice.gif" width="81" height="21" alt="센터선택" /></dd>
        <dd class="Right_Contents_SearchOption">
         <s:if test="%{#authCode == 'ADMIN'}">	<%// 통합 관리자인 경우, %>
        	<s:include value="/view/include/common/deskcode/deskcode_total.jsp"/>
   		</s:if>
   		<s:if test="%{#authCode != 'ADMIN'}"> <%// 통합 관리자가 아닌 경우 %>
   			<s:if test="%{#authCode == 'ADMIN_ORG'}"> <%// 소속 관리자인 경우 %>
   				<s:if test="%{#orgCode == 'KIPRA'}"> <%// 소속 관리자중에서 소속이 KIPRA인 경우 %>
   					<s:include value="/view/include/common/deskcode/deskcode_kipra.jsp"/>
   				</s:if>
   				<s:if test="%{#orgCode == 'KOTRA'}"> <%// 소속 관리자중에서 소속이 KOTRA인 경우 %>
   					<s:include value="/view/include/common/deskcode/deskcode_kotra.jsp"/>
   				</s:if>
   			</s:if>
   			<s:if test="%{#authCode == 'CONSULTANT'}"> <%// 컨설턴트인 경우 %>
   				<s:include value="/view/include/common/deskcode/deskcode_consultant.jsp"/>
   			</s:if>
   			<s:set name="dCode" value="%{deskCode}"/>
   		</s:if>
        </dd>
        <dd class="Right_Contents_Notice">총 <span class="TEXT_Red_Bold"><s:property value="#totalCount"/></span>건의 침해조사 일지 정보 검색됨</dd>
        <dd class="Right_Contents_NoticeBtn"><img src="/images/notice/btn_ExelDown.gif" id="btn_excel_download" width="114" height="26" alt="엑셀다운로드" style="cursor:pointer"/></dd>
        <dd style="width:50px;position:relative;;margin:5px;">
        	<s:select name="year" id="year" list="#{'':'전체','2013':'2013','2012':'2012','2011':'2011'}"/>&nbsp;
        </dd>
        <dd style="width:70px;position:relative;;margin:5px;">
        	<s:select name="invadeSearchOption" id="invadeSearchOption" list="#{'localName':'업체명'}"/>&nbsp;
        </dd>
        <dd style="width:120px;position:relative;;margin:5px;">
        	<input type="text" name="invadeSearchKeyword" id="invadeSearchKeyword" value="<s:property value="invadeSearchKeyword"/>" style="width:110px;" maxlength="10"/>&nbsp;
        </dd>
        <dd style="width:134px;position:relative;margin:5px;">
        	<img src="/images/report/apply/btn_search.gif" width="47" height="22" alt="검색" id="invadeSearch" style="cursor:pointer;"/>
        </dd>
        <dd style="width:150px;position:relative;margin:5px;">
    		<label for="state">정렬 : </label>
        	<s:select name="order" id="order" list="#{'consultingDate':'신청일▼','consultingDate2':'신청일▲','localName':'업체명','iprCodeName':'피침해권리명', 'state':'상태' }" />
    	</dd>
    	<dd style="width:150px;position:relative;margin:5px;">
    		<label for="state">상태 : </label>
        	<s:select name="state" list="#{'':'전체','STC10':'본사접수완료','STC11':'센터접수완료','STC40':'침해조사완료','STC50':'행정단속완료'}" />
    	</dd>
 </form>      
        <dd class="Center_Top_contents">
          <div id="LIst_Zone">
            <dl>
              <dd>
                <table cellspacing="0" border="1" summary="글목록" class="Listboard">
                  <caption>글목록</caption>
                  <colgroup><col width="55"><col width="1"><col width="229"><col width="1"><col width="205"><col width="1"><col width="114"><col width="1"><col width="113"></colgroup>
                  <thead>
                    <tr>
                      <th scope="col">번호</th>
                      <th scope="col"><img src="/images/notice/board_line.gif" width="1" height="30" alt="" /></th>
                      <th scope="col">업체명</th>
                      <th scope="col"><img src="/images/notice/board_line.gif" width="1" height="30" alt="" /></th>    
                      <th scope="col">피침해권리명</th>
                      <th scope="col"><img src="/images/notice/board_line.gif" width="1" height="30" alt="" /></th>
                      <th scope="col">신청일</th>
                      <th scope="col"><img src="/images/notice/board_line.gif" width="1" height="30" alt="" /></th>                  
                      <th scope="col">상태</th>
                    </tr>
                  </thead>
                  <!-- 등록된 글이 없을때 나오는것 
                  <tbody>
                   <tr>
                     <td colspan="91">등록된 글이 없습니다.</td>
                   </tr>                                         
                  </tbody>
                  등록된 글이 없을때 나오는것 -->
                  <!-- 리스트 부분 -->
                  <tbody>
                  	<s:if test="invadeList.size == 0">
                  		<tr>
                  			<td colspan="9" style="text-align:center">조회된 결과가 없습니다.</td>
                  		</tr>
                  	</s:if>
                  	<s:if test="invadeList.size !=0">
                  		<s:iterator value="invadeList" status="stat">
		                    <tr>
		                      <td><s:property value="(#totalCount + 1 - ((pageInfoDataMap.pageNumber - 1) * pageInfoDataMap.countPerPage)) - (#stat.count)"/></td>
		                      <td><img src="/images/notice/board_line2.gif" width="1" height="24" alt="" /></td>
		                      <td class="tdTit"><s:property value="localName"/></td>
		                      <td><img src="/images/notice/board_line2.gif" width="1" height="24" alt="" /></td>
		                      <td>
		                      		<a href="/invade/invadeDetail.desk?invadeSeq=<s:property value="invadeSeq"/>&pageNumber=<s:property value="#currentPageNumber"/>&deskCode=<s:property value="deskCode"/>"><s:property value="iprCodeName"/></a>
		                      </td>
		                      <td><img src="/images/notice/board_line2.gif" width="1" height="24" alt="" /></td>
		                      <td><s:property value="consultingDate"/></td>
		                      <td><img src="/images/notice/board_line2.gif" width="1" height="24" alt="" /></td>
		                      <td>
		                      	<c:if test="${invadeState == 'STC10'}"><img src="/images/common/icon_01.gif" alt="본사 접수 완료"/></c:if>
		                      	<c:if test="${invadeState == 'STC11'}"><img src="/images/common/icon_02.gif" alt="센터 접수 완료"/></c:if>
		                      	<c:if test="${invadeState == 'STC40'}"><img src="/images/common/icon_05.gif" alt="침해조사 완료"/></c:if>
		                      	<c:if test="${invadeState == 'STC50'}"><img src="/images/common/icon_06.gif" alt="행정단속 완료"/></c:if>
		                      </td>
		                    </tr>     		
                  		</s:iterator>
                  	</s:if>

                    </tbody>
                  <!-- 리스트 부분 -->
                </table>
              </dd>
               
            </dl> 
            <dl class="List_Page_area"><!-- 리스트 페이징 부분 -->
              <dd class="page_area">
                <div class="paginate">
                    <s:if test="pageInfoDataMap.startPage > pageInfoDataMap.pagePerBlock">
						<s:a href="%{listURLPrev}" cssClass="pre">이전페이지</s:a>
					</s:if>
			      	<c:forEach var="pageNum" begin="${pageInfoDataMap.startPage}" end="${pageInfoDataMap.endPage}">
						<c:choose>
							<c:when test="${pageNum != 0 && pageNum == pageInfoDataMap.pageNumber}">
								<strong>${pageNum}</strong>
							</c:when>
							<c:when test="${pageNum == 0 }">
							
							</c:when>
							<c:otherwise>
								<a href="<c:url value="/invade/invadeList.desk?pageNumber=${pageNum}&deskCode=${deskCode}&state=${state }&year=${year }&order=${order }"/>"> ${pageNum} </a>
							</c:otherwise>
						</c:choose>
					</c:forEach>
			      	<s:if test="pageInfoDataMap.endPage < pageInfoDataMap.totalPageCount">
						<s:a href="%{listURLNext}" cssClass="next">다음페이지</s:a>
					</s:if>
                </div>               
              </dd>
            </dl><!-- 리스트 페이징 부분 -->
            <dl class="List_Btn_area"><!-- 버튼 부분 -->
             <dd class="Left_Zone"><a href="/invade/invadeList.desk?deskCode=<s:property value='#session.deskCode'/>"><img src="/images/notice/btn_list.gif" alt="목록" width="52" height="26" border="0" /></a></dd>
             <!-- <s:if test="#authCode != 'ADMIN' && #authCode != 'ADMIN_ORG'">
             	<dd class="Right_Zone"><a href="/invade/invadeForm.desk"><img src="/images/report/invasion/btn_write.gif" width="163" height="26" alt="침해조사 상담일지 등록" border="0" /></a></dd>
              </s:if>-->
              <s:if test="#orgCode != 'KIPO'">
			  <s:if test="#session.deskCode == #dCode">
             	<dd class="Right_Zone"><a href="/invade/invadeForm.desk"><img src="/images/report/invasion/btn_write.gif" width="140" height="26" alt="침해조사 상담일지 등록" border="0" /></a></dd>
              </s:if>
			   <s:if test="#authCode == 'ADMIN_ORG'">
             	<dd class="Right_Zone"><a href="/invade/invadeForm.desk"><img src="/images/report/invasion/btn_write.gif" width="140" height="26" alt="침해조사 상담일지 등록" border="0" /></a></dd>
              </s:if>
			   <s:if test="#authCode == 'ADMIN'">
             	<dd class="Right_Zone"><a href="/invade/invadeForm.desk"><img src="/images/report/invasion/btn_write.gif" width="140" height="26" alt="침해조사 상담일지 등록" border="0" /></a></dd>
              </s:if>
			  </s:if>
            </dl><!-- 버튼 부분 -->   
            <dl class="List_Btn_area"></dl> 
            <dl class="help">
              <dd class="tit">도움말</dd>
              <dd>
                <p>* 업무상태 관련 안내</p>
                <p>- 본사 접수 완료 : 본사에서 접수가 완료된 상태이며, 국가와 데스크가 미정이면 아직 센터에 이관이 안된 상태.<br />
                &nbsp;&nbsp;심사평가표가 접수되면 국가, 데스크를 지정하여 해당 접수를 이관합니다.</p>
                <p>-센터 접수 완료 : 본사 접수 완료된 상태이면서 데스크가 지정되어 이관되었으면, 각 데스크에서는 "센터접수 완료"로 상태를 바꾸고 <br/> 
                &nbsp;&nbsp;업무를 시작합니다. </p>
                <p>- 출원 완료 : 출원서를 각국 특허청에 제출완료한 경우 (출원접수증 교부 받은 경우)<br />
                &nbsp;&nbsp;단, 중국의 경우 수리 통지서를 접수한 이후이 경우</p>
                <p>- 등록 완료 : 각국 특허청에서 등록 수리가 완료되어 등록증이 신청인(대리인)에게 교부된 상태</p>
              </dd>
            </dl><!-- 도움말 부분 -->        
          </div>
        </dd>
      </dl>
      <!-- 오른쪽 내용 끝 --> 
    </div>
  </div>
  <!-- center 나누어 지는 부분 끝 --> 
</div>


